package com.daiqee.util;

import com.baomidou.mybatisplus.plugins.Page;

/**
 * 确保能取到值,所以需要使用同一个ThreadLocal类
 * 
 * <br/>
 * @since JDK 1.8
 * @version  V2.4.1
 * @author RichardTang 
 * @date: 2018年6月27日
 * @package com.daiqee.util
 * @copyright:Copyright (c) 2018, 1245811923@qq.com All Rights Reserved.
 */
@SuppressWarnings("rawtypes")
public class PageThreadLocalUtils {
	
	private final static ThreadLocal<Page> THREAD_LOCAL = new ThreadLocal<Page>();
	
	private PageThreadLocalUtils() {};
	
	public static void setValue(Page value) {
		THREAD_LOCAL.set(value);
	}
	
	public static Page getValue() {
		return THREAD_LOCAL.get();
	}
	
}
